package com.nfit.shopadmin.mapper;

import com.nfit.shopmodel.entity.product.Category;
import com.nfit.shopmodel.vo.category.CategoryDTO;
import com.nfit.shopmodel.vo.category.ProductDTO;
import com.nfit.shopmodel.vo.category.SkuDTO;
import com.nfit.shopmodel.vo.category.SubCategoryDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName:CategoryMapper
 * Package:com.nfit.shopweb.mapper
 * Description
 *
 * @Author L
 * @Create 2024/12/9 9:57
 */
@Mapper
public interface CategoryMapper {

    /**
     * 移动端查询前10条商品分类数据
     */
    List<Category> getCategoryList();

    List<CategoryDTO> findAllCategories();

    List<SubCategoryDTO> findSubCategoriesByParentId(@Param("parentId") Long parentId);

    List<ProductDTO> findProductsByCategoryId(@Param("categoryId") Long categoryId);

    List<SkuDTO> findSkuByProductId(@Param("productId") Long productId);




}
